import { PromptTemplate } from "@langchain/core/prompts";

const pt = PromptTemplate.fromTemplate(
  "你是一位精通{subject}的专家，请用{language}来回答用户的问题：{info}"
);
const pt2 = await pt.partial({
  subject: "生物学",
});
const pt3 = await pt2.partial({
  language: "中文",
});
const result = await pt3.format({
  info: "大象的鼻子为什么那么长",
});
console.log(result);
